package com.ruoyi.info.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.info.mapper.CmsLikesMapper;
import com.ruoyi.info.domain.CmsLikes;
import com.ruoyi.info.service.ICmsLikesService;
import com.ruoyi.common.core.text.Convert;

/**
 * 点赞Service业务层处理
 * 
 * @author xwj
 * @date 2023-07-07
 */
@Service
public class CmsLikesServiceImpl implements ICmsLikesService 
{
    @Autowired
    private CmsLikesMapper cmsLikesMapper;

    /**
     * 查询点赞
     * 
     * @param id 点赞主键
     * @return 点赞
     */
    @Override
    public CmsLikes selectCmsLikesById(Long id)
    {
        return cmsLikesMapper.selectCmsLikesById(id);
    }

    /**
     * 查询点赞列表
     * 
     * @param cmsLikes 点赞
     * @return 点赞
     */
    @Override
    public List<CmsLikes> selectCmsLikesList(CmsLikes cmsLikes)
    {
        return cmsLikesMapper.selectCmsLikesList(cmsLikes);
    }

    /**
     * 新增点赞
     * 
     * @param cmsLikes 点赞
     * @return 结果
     */
    @Override
    public int insertCmsLikes(CmsLikes cmsLikes)
    {
        return cmsLikesMapper.insertCmsLikes(cmsLikes);
    }

    /**
     * 修改点赞
     * 
     * @param cmsLikes 点赞
     * @return 结果
     */
    @Override
    public int updateCmsLikes(CmsLikes cmsLikes)
    {
        return cmsLikesMapper.updateCmsLikes(cmsLikes);
    }

    /**
     * 批量删除点赞
     * 
     * @param ids 需要删除的点赞主键
     * @return 结果
     */
    @Override
    public int deleteCmsLikesByIds(String ids)
    {
        return cmsLikesMapper.deleteCmsLikesByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除点赞信息
     * 
     * @param id 点赞主键
     * @return 结果
     */
    @Override
    public int deleteCmsLikesById(Long id)
    {
        return cmsLikesMapper.deleteCmsLikesById(id);
    }
}
